#include <iostream>
using namespace std;

typedef long long LL;

LL a,b;

LL qpow(LL a,LL b){
    LL ret = 1;
    while(b){
        if(b & 1){
            ret = ret * a;
        }
        a = a * a;
        b >>= 1;
    }
    return ret;
}

int main(){
    cin >> a >> b;
    cout << qpow(a,b) << endl;
    return 0;
}
